// components/voicebox/index.js
Component({
  /**
   * 组件的属性列表
   */
  properties: {
    info:Object,
  },

  /**
   * 组件的初始数据
   */
  data: {
    star:5,
  },

  /**
   * 组件的方法列表
   */
  methods: {
    toDetail(){
      wx.navigateTo({
        url: '/pages/list/detail/detail?id='+this.properties.info.id,
      })
    },
    onPlay(){

    },
  },
  lifetimes:{
    attached(){
      const star = parseInt(this.properties.info.star)
      this.setData({
        star
      })
    }
  }
})
